package com.mspbots.script.service;

import com.mspbots.script.model.TenantScript;
import com.mspbots.script.model.TriggerEventDTO;
import reactor.core.publisher.Mono;

import javax.script.ScriptException;
import java.util.List;

public interface ScriptService {

    Object execute(TenantScript script) throws ScriptException;

    Object executeOne(TriggerEventDTO triggerEventDTO);

    Object execute(TriggerEventDTO triggerEventDTO);

    Object execute(List<TenantScript> scripts, TriggerEventDTO triggerEventDTO);

    Object execute(List<TenantScript> scripts);

    Mono<Object> executeById(TriggerEventDTO triggerEventDTO);

    Object executeSystemScript(Long id);

    Object executeTenantScript(Long id);
}
